/*
 * @# SerializeUtil.java 2011-12-2 下午07:05:54
 * 
 * Copyright (C) 2010 - 2011 广州羿安信息科技有限公司
 * Guangzhou ianswer information technology co. ltd.
 * 
 * All rights reserved!
 */
package com.ianswer.experiments.memcached;

/**
 * @author lunx
 */
public interface SerializerUtil {

	/**
	 * 序列化
	 * @param obj
	 * @return
	 * @throws RuntimeException
	 */
	public byte[] serializer(Object obj) throws RuntimeException;

	/**
	 * 反序列化
	 * @param <T>
	 * @param bytes
	 * @param clazz
	 * @return
	 * @throws RuntimeException
	 */
	public <T> T unSerializer(byte[] bytes, Class<T> clazz) throws RuntimeException;
}
